package edu.sctu.jsoup.service;

import edu.sctu.jsoup.repo.ArticleRepo;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;

@Service
public class ArticleService {
    @Autowired
    private ArticleRepo articleRepo;

    public void run(){
        try {
            Document document = Jsoup.connect("https://www.baidu.com").get();
            Elements elements = document.select("");
            System.out.println(document.head());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
